package com.mall.b2c.hessian.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.mall.b2c.hessian.SystemHessian;
import com.mall.b2c.util.SettingUtils;
import com.mall.common.hessian.impl.BaseHessianImpl;
import com.mall.common.service.AreaService;

@Service("systemHessian")
public class SystemHessianImpl extends BaseHessianImpl implements SystemHessian {
	@Resource private AreaService areaService;

	@Override
	public String getAreaByParentId(Long parentId) {
		return areaService.getAreaByPath(parentId).toString();
	}

	@Override
	public String getSetting() {
		return objToJson(SettingUtils.get());
	}

}
